<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="com.java.service.*,java.util.*,com.java.model.UserSession,com.java.util.*"%>
<jsp:include page="/jsp/common/header.jsp"></jsp:include>
<script type="text/javascript" src="/js/sms.js"></script>
<%
	String checkbox[] 		= request.getParameterValues("checkbox");
	String cell_phone_no[] 	= request.getParameterValues("cell_phone_no");
	String login_nm[] 		= request.getParameterValues("login_nm");
	String uni_id[] 		= request.getParameterValues("uni_id2");
	String user_id[] 		= request.getParameterValues("user_id");

	String cell_phone_no1[] = new String[checkbox.length];
	String login_nm1[] 		= new String[checkbox.length];
	String uni_id1[] 		= new String[checkbox.length];
	String user_id1[] 		= new String[checkbox.length];
	
	//체크된 항목의 값만  SMS발송을 해주기 위함
	for(int i =0 ; i < checkbox.length; i++){
		login_nm1[i] 		= login_nm[Integer.parseInt(checkbox[i])];
		cell_phone_no1[i] 	= cell_phone_no[Integer.parseInt(checkbox[i])];
		uni_id1[i] 			= uni_id[Integer.parseInt(checkbox[i])];
		user_id1[i] 		= user_id[Integer.parseInt(checkbox[i])];
	}

%>
<body onload="init_now_date(document.frm)">
<form name="frm">
<table width="500" cellpadding="0" cellspacing="0" style="border-collapse:collapse; border:1px solid #1a518a" align="left">
  <tr>
    <td>
    	<table width="500" height="25" border="0" cellpadding="0" cellspacing="0"  align="left">
        	<tr>
            	<td align="left">
                	<table border="0" cellpadding="0" cellspacing="0" align="left">
                    <tr style="background-color:#4b80b6">
                   	 <td width="483" align="left" style="font-size:14px; color:#ffffff; font-weight:bold;"><img src="/images/popup_icon1.gif" alt="" border="0" style="padding:0 0 2px 0;"/>&nbsp;SMS 발송</td>
                	 <td align="right"><img src="/images/popup_icon2.gif" alt="" border="0" style="padding:0 0 2px 0;"/></td>
                    </tr>
                    </table>
                </td>
            </tr>
		<!-- 
            <tr>
           	  <td align="left" style="padding:10px 0 5px 0;">
               	  <table border="0" cellpadding="0" cellspacing="0" align="left">
                    <tr>
                   	 <td width="390" align="center" >
                     	<table width="390" border="0" cellpadding="0" cellspacing="0" align="left">
                        	<tr>
                            	<td style="text-align:center;"><font style="font-weight:bold;">검색건:</font>&nbsp;[463]건&nbsp;&nbsp;&nbsp;|</td>
                                <td style="text-align:center;"><font style="font-weight:bold;">메인구분:</font>&nbsp;전체&nbsp;&nbsp;&nbsp;|</td>
                                <td style="text-align:center;"><font style="font-weight:bold;">검색조건:</font>&nbsp;없음&nbsp;</td>
                            </tr>
                        </table>
                     </td>
                     
                   	 <td align="left">
                     	<table border="0" cellpadding="0" cellspacing="0" align="left">
                        	<tr>
                             <td><input name="button" type="button" class="btn_gray_b_w47_3"  value=">검색조건 적용" onClick="window.location='http://www.naver.com'"/></td>
                            </tr>
                        </table>
                       </td>
                    </tr>
                  </table>
              </td>
            </tr>
             -->
            <tr>
            	<td align="center"><img src="/images/line_dotted.gif" alt="" border="0" style="padding:0 0 5px 0;"/></td>
            </tr>
            <tr>
            	<td align="center" >
                	<table border="0" cellpadding="0" cellspacing="0">
                    <tr>
                   	 <td align="left" valign="top" style="margin:0 0 10px 0;" cospan="2">
                       <table border="0" class="SMS_table" cellpadding="0" cellspacing="0">
                      <tr>
                        <td class="table_th">이름</td>
                        <td class="table_th">핸드폰</td>
                        <td class="table_thEND">체크</td>
                      </tr>
                      <%for(int i=0; i < checkbox.length; i++){ %>
	<!-- SMS발송(insert) 으로 넘길 인자 -->
<input type="hidden" name="dest_phone" value="<%=cell_phone_no1[i]%>">
<input type="hidden" name="login_nm" value="<%=login_nm1[i] %>">
<input type="hidden" name="uni_id" value="<%=uni_id1[i] %>">
<input type="hidden" name="user_id" value="<%=user_id1[i] %>">
	<!-- //SMS발송(insert) 으로 넘길 인자 -->
                      <tr>
                        <td><%=login_nm1[i] %></td>
                        <td><%=cell_phone_no1[i] %></td>
                        <td><input type="checkbox" name="checkbox" id="checkbox" onclick="" value="<%=i%>"></td>
                      </tr>
                      <%} %>
                    </table>

                     </td>
                   	 <td align="center">
                     	<!-- table border="0" cellpadding="0" cellspacing="0"  style="margin:0 0 10px 0;">
                        	<tr>
                              <td width="200" colspan="2"><img src="/images/hpimg.gif" alt="" border="0" style="padding:0 0 2px 0;"/></td>
                        	</tr>
                        </table-->

<!-- SMS 이미지  -->
<div>
<div style="height:360px; width:160px;background:url('/images/sms_bg.gif'); margin:10px;">
    <div style="margin:40px 0px 0px 19px;" >
        <textarea name="send_text"onfocus="viewLength(document.frm.send_text, document.frm.sms_all_bytes)" onChange="viewLength(document.frm.send_text, document.frm.sms_all_bytes)" onKeyUp="viewLength(document.frm.send_text, document.frm.sms_all_bytes)" style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; FONT-SIZE: 11pt; BACKGROUND: none transparent scroll repeat 0% 0%; BORDER-BOTTOM-WIDTH: 0px; OVERFLOW: hidden; BORDER-RIGHT-WIDTH: 0px; colorvc_resdate: #000000; width:120px; height:130px;" rows="7" cols="15"></textarea>
	    <div>
            <div style='float:left; font-size:8pt;' valign=bottom>전송:</div>
	        <div style="float:right; margin-right:5px;">
	            <input style="float:left; border:0; height:10px; color:#ffffff; text-align:right; background:#979797; font-size:8pt; padding-top:3px;"  size="2" value="0" name="sms_all_bytes">
	            <span>Bytes</span>
            </div>
	    </div>
    </div>

    <div class="clear"></div>
<br>
<br>
	<div >
	    <div style="font-weight:bold; color:#2b74be;">발신번호
	    <input maxLength="12" size="12" name="send_phone_num" value="" 
        style="BORDER-RIGHT: #999999 1px solid; BORDER-TOP: #999999 1px solid; BORDER-LEFT: #999999 1px solid; BORDER-BOTTOM: #999999 1px solid"
        onkeyPress='if ((event.keyCode<48) || (event.keyCode>57)) event.returnValue=false;' style='ime-mode:disabled'>
		</div>
	</div>
<input type=hidden name=send_date_act value=n>
<input type=hidden name=send_date_act value=n>
<input type=hidden name=reserve_year >
<input type=hidden name=reserve_month >
<input type=hidden name=reserve_day >
<input type=hidden name=reserve_hour >
<input type=hidden name=reserve_min >
<!-- 
    <div style="font-size:11px;">전송유형
        <input type="radio" CHECKED value="n" name="send_date_act">즉시
        <input type="radio" value="y" name="send_date_act">예약</span>
    </div>
    <div style="">	
        <span style="FONT-SIZE: 11px">예약
        <input style="BORDER:1px solid #999999; FONT-SIZE: 11px; padding:2px 0px 0px 2px;" maxLength="4" size="4" value="" name="reserve_year" onkeyPress='if ((event.keyCode<48) || (event.keyCode>57)) event.returnValue=false;' style='ime-mode:disabled'>
        -
        <input style="BORDER:1px solid #999999; FONT-SIZE: 11px; padding:2px 0px 0px 2px;" maxLength="2" size="2" value="" name="reserve_month" onkeyPress='if ((event.keyCode<48) || (event.keyCode>57)) event.returnValue=false;' style='ime-mode:disabled'>
        -
        <input style="BORDER:1px solid #999999; FONT-SIZE: 11px; padding:2px 0px 0px 2px;" maxLength="2" size="2" value="" name="reserve_day" onkeyPress='if ((event.keyCode<48) || (event.keyCode>57)) event.returnValue=false;' style='ime-mode:disabled'>
        <br>
        <img src="/images/sms/phone/blank.gif" width=58 height=1>
        <input style="BORDER:1px solid #999999; FONT-SIZE: 11px; padding:2px 0px 0px 2px;" maxLength="2" size="2" value="" name="reserve_hour" onkeyPress='if ((event.keyCode<48) || (event.keyCode>57)) event.returnValue=false;' style='ime-mode:disabled'>시 
        <input style="BORDER:1px solid #999999; FONT-SIZE: 11px; padding:2px 0px 0px 2px;" maxLength="2" size="2" value="" name="reserve_min" onkeyPress='if ((event.keyCode<48) || (event.keyCode>57)) event.returnValue=false;' style='ime-mode:disabled'>분<br>
    </div>
 -->    
    <div style="margin:8px 0px 0px 20px;" >
        <a href="javascript:send_check(document.frm);">
        <img src="/images/sms_send.gif" border="0" width="54" height="24"></a>
        <a href="javascript:send_clear(document.frm);">
        <img src="/images/sms-clear.gif" border="0" width="61" height="24"></a>
    </div>
</div>
</div>
<!-- //SMS 이미지  -->
                      </td>
                    </tr>
                  </table>
                  
                </td>
            </tr>    
        </table>
     </td>
  </tr>
</table>
</form>
</body>
</html>

<iframe src="" name="ifm" width="0" height="0"></iframe>
